# find all files in the current directory
aux_source_directory(. DIR_ALGORITHM_SRCS)
find_package(GDAL REQUIRED)
include_directories(${GDAL_INCLUDE_DIR})
message("compile Lidar Algorithm")
include_directories("../../library/")

find_package(OpenCV)
if(OpenCV_FOUND)
    message(STATUS "complie with openCV")
else()
    message("compile without openCV\n")
endif()

add_library(libalgorithm ${DIR_ALGORITHM_SRCS})
target_link_libraries(libalgorithm libbase libgeometry)
target_link_libraries(libalgorithm ${GDAL_LIBRARY})
if(OpenCV_FOUND)
    	target_link_libraries(libalgorithm ${OpenCV_LIBS})
endif()
